3.7.39 \(\int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx\) [639]

Optimal. Leaf size=136 \[ -\frac {2 \sqrt {-a} \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{\sqrt {c} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}} \]

[Out]

-2*EllipticE(1/2*(1-x*c^(1/2)/(-a)^(1/2))^(1/2)*2^(1/2),(-2*a*g/(-a*g+f*(-a)^(1/2)*c^(1/2)))^(1/2))*(-a)^(1/2)
*(g*x+f)^(1/2)*(c*x^2/a+1)^(1/2)/c^(1/2)/(c*x^2+a)^(1/2)/((g*x+f)*c^(1/2)/(g*(-a)^(1/2)+f*c^(1/2)))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 136, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {733, 435} \begin {gather*} -\frac {2 \sqrt {-a} \sqrt {\frac {c x^2}{a}+1} \sqrt {f+g x} E\left (\text {ArcSin}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{\sqrt {c} \sqrt {a+c x^2} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {-a} g+\sqrt {c} f}}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[f + g*x]/Sqrt[a + c*x^2],x]

[Out]

(-2*Sqrt[-a]*Sqrt[f + g*x]*Sqrt[1 + (c*x^2)/a]*EllipticE[ArcSin[Sqrt[1 - (Sqrt[c]*x)/Sqrt[-a]]/Sqrt[2]], (-2*a
*g)/(Sqrt[-a]*Sqrt[c]*f - a*g)])/(Sqrt[c]*Sqrt[(Sqrt[c]*(f + g*x))/(Sqrt[c]*f + Sqrt[-a]*g)]*Sqrt[a + c*x^2])

Rule 435

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[(Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*Ell
ipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0
]

Rule 733

Int[((d_) + (e_.)*(x_))^(m_)/Sqrt[(a_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2*a*Rt[-c/a, 2]*(d + e*x)^m*(Sqrt[1
+ c*(x^2/a)]/(c*Sqrt[a + c*x^2]*(c*((d + e*x)/(c*d - a*e*Rt[-c/a, 2])))^m)), Subst[Int[(1 + 2*a*e*Rt[-c/a, 2]*
(x^2/(c*d - a*e*Rt[-c/a, 2])))^m/Sqrt[1 - x^2], x], x, Sqrt[(1 - Rt[-c/a, 2]*x)/2]], x] /; FreeQ[{a, c, d, e},
 x] && NeQ[c*d^2 + a*e^2, 0] && EqQ[m^2, 1/4]

Rubi steps

\begin {align*} \int \frac {\sqrt {f+g x}}{\sqrt {a+c x^2}} \, dx &=\frac {\left (2 a \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}}\right ) \text {Subst}\left (\int \frac {\sqrt {1+\frac {2 a \sqrt {c} g x^2}{\sqrt {-a} \left (c f-\frac {a \sqrt {c} g}{\sqrt {-a}}\right )}}}{\sqrt {1-x^2}} \, dx,x,\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )}{\sqrt {-a} \sqrt {c} \sqrt {\frac {c (f+g x)}{c f-\frac {a \sqrt {c} g}{\sqrt {-a}}}} \sqrt {a+c x^2}}\\ &=-\frac {2 \sqrt {-a} \sqrt {f+g x} \sqrt {1+\frac {c x^2}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {1-\frac {\sqrt {c} x}{\sqrt {-a}}}}{\sqrt {2}}\right )|-\frac {2 a g}{\sqrt {-a} \sqrt {c} f-a g}\right )}{\sqrt {c} \sqrt {\frac {\sqrt {c} (f+g x)}{\sqrt {c} f+\sqrt {-a} g}} \sqrt {a+c x^2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 20.39, size = 294, normalized size = 2.16 \begin {gather*} \frac {2 i \left (\sqrt {c} f+i \sqrt {a} g\right ) \sqrt {\frac {g \left (\sqrt {a}+i \sqrt {c} x\right )}{-i \sqrt {c} f+\sqrt {a} g}} \sqrt {f+g x} \left (E\left (i \sinh ^{-1}\left (\sqrt {-\frac {\sqrt {c} (f+g x)}{\sqrt {c} f-i \sqrt {a} g}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )-F\left (i \sinh ^{-1}\left (\sqrt {-\frac {\sqrt {c} (f+g x)}{\sqrt {c} f-i \sqrt {a} g}}\right )|\frac {\sqrt {c} f-i \sqrt {a} g}{\sqrt {c} f+i \sqrt {a} g}\right )\right )}{\sqrt {c} g \sqrt {\frac {\sqrt {c} (f+g x)}{g \left (i \sqrt {a}+\sqrt {c} x\right )}} \sqrt {a+c x^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[f + g*x]/Sqrt[a + c*x^2],x]

[Out]

((2*I)*(Sqrt[c]*f + I*Sqrt[a]*g)*Sqrt[(g*(Sqrt[a] + I*Sqrt[c]*x))/((-I)*Sqrt[c]*f + Sqrt[a]*g)]*Sqrt[f + g*x]*
(EllipticE[I*ArcSinh[Sqrt[-((Sqrt[c]*(f + g*x))/(Sqrt[c]*f - I*Sqrt[a]*g))]], (Sqrt[c]*f - I*Sqrt[a]*g)/(Sqrt[
c]*f + I*Sqrt[a]*g)] - EllipticF[I*ArcSinh[Sqrt[-((Sqrt[c]*(f + g*x))/(Sqrt[c]*f - I*Sqrt[a]*g))]], (Sqrt[c]*f
 - I*Sqrt[a]*g)/(Sqrt[c]*f + I*Sqrt[a]*g)]))/(Sqrt[c]*g*Sqrt[(Sqrt[c]*(f + g*x))/(g*(I*Sqrt[a] + Sqrt[c]*x))]*
Sqrt[a + c*x^2])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(395\) vs. \(2(108)=216\).
time = 0.09, size = 396, normalized size = 2.91

method result size
default \(\frac {2 \sqrt {g x +f}\, \sqrt {c \,x^{2}+a}\, \left (c f -g \sqrt {-a c}\right ) \sqrt {-\frac {\left (g x +f \right ) c}{g \sqrt {-a c}-c f}}\, \sqrt {\frac {\left (-c x +\sqrt {-a c}\right ) g}{g \sqrt {-a c}+c f}}\, \sqrt {\frac {\left (c x +\sqrt {-a c}\right ) g}{g \sqrt {-a c}-c f}}\, \left (\sqrt {-a c}\, \EllipticF \left (\sqrt {-\frac {\left (g x +f \right ) c}{g \sqrt {-a c}-c f}}, \sqrt {-\frac {g \sqrt {-a c}-c f}{g \sqrt {-a c}+c f}}\right ) g -\sqrt {-a c}\, \EllipticE \left (\sqrt {-\frac {\left (g x +f \right ) c}{g \sqrt {-a c}-c f}}, \sqrt {-\frac {g \sqrt {-a c}-c f}{g \sqrt {-a c}+c f}}\right ) g +f \EllipticF \left (\sqrt {-\frac {\left (g x +f \right ) c}{g \sqrt {-a c}-c f}}, \sqrt {-\frac {g \sqrt {-a c}-c f}{g \sqrt {-a c}+c f}}\right ) c -\EllipticE \left (\sqrt {-\frac {\left (g x +f \right ) c}{g \sqrt {-a c}-c f}}, \sqrt {-\frac {g \sqrt {-a c}-c f}{g \sqrt {-a c}+c f}}\right ) c f \right )}{g \left (c g \,x^{3}+c f \,x^{2}+a g x +f a \right ) c^{2}}\) \(396\)
elliptic \(\frac {\sqrt {\left (g x +f \right ) \left (c \,x^{2}+a \right )}\, \left (\frac {2 f \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}+\frac {2 g \left (\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x -\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\, \sqrt {\frac {x +\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}}\, \left (\left (-\frac {f}{g}-\frac {\sqrt {-a c}}{c}\right ) \EllipticE \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )+\frac {\sqrt {-a c}\, \EllipticF \left (\sqrt {\frac {x +\frac {f}{g}}{\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}, \sqrt {\frac {-\frac {f}{g}+\frac {\sqrt {-a c}}{c}}{-\frac {f}{g}-\frac {\sqrt {-a c}}{c}}}\right )}{c}\right )}{\sqrt {c g \,x^{3}+c f \,x^{2}+a g x +f a}}\right )}{\sqrt {g x +f}\, \sqrt {c \,x^{2}+a}}\) \(556\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^(1/2)/(c*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*(g*x+f)^(1/2)*(c*x^2+a)^(1/2)*(c*f-g*(-a*c)^(1/2))*(-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-c*x+(-a*c)^(1/
2))*g/(g*(-a*c)^(1/2)+c*f))^(1/2)*((c*x+(-a*c)^(1/2))*g/(g*(-a*c)^(1/2)-c*f))^(1/2)*((-a*c)^(1/2)*EllipticF((-
(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*g-(-a*c)^(1/2)*Ellip
ticE((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*g+f*EllipticF
((-(g*x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*c-EllipticE((-(g*
x+f)*c/(g*(-a*c)^(1/2)-c*f))^(1/2),(-(g*(-a*c)^(1/2)-c*f)/(g*(-a*c)^(1/2)+c*f))^(1/2))*c*f)/g/(c*g*x^3+c*f*x^2
+a*g*x+a*f)/c^2

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)/(c*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(g*x + f)/sqrt(c*x^2 + a), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.28, size = 173, normalized size = 1.27 \begin {gather*} \frac {2 \, {\left (2 \, \sqrt {c g} f {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right ) - 3 \, \sqrt {c g} g {\rm weierstrassZeta}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (c f^{2} - 3 \, a g^{2}\right )}}{3 \, c g^{2}}, -\frac {8 \, {\left (c f^{3} + 9 \, a f g^{2}\right )}}{27 \, c g^{3}}, \frac {3 \, g x + f}{3 \, g}\right )\right )\right )}}{3 \, c g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)/(c*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

2/3*(2*sqrt(c*g)*f*weierstrassPInverse(4/3*(c*f^2 - 3*a*g^2)/(c*g^2), -8/27*(c*f^3 + 9*a*f*g^2)/(c*g^3), 1/3*(
3*g*x + f)/g) - 3*sqrt(c*g)*g*weierstrassZeta(4/3*(c*f^2 - 3*a*g^2)/(c*g^2), -8/27*(c*f^3 + 9*a*f*g^2)/(c*g^3)
, weierstrassPInverse(4/3*(c*f^2 - 3*a*g^2)/(c*g^2), -8/27*(c*f^3 + 9*a*f*g^2)/(c*g^3), 1/3*(3*g*x + f)/g)))/(
c*g)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {f + g x}}{\sqrt {a + c x^{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**(1/2)/(c*x**2+a)**(1/2),x)

[Out]

Integral(sqrt(f + g*x)/sqrt(a + c*x**2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^(1/2)/(c*x^2+a)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(g*x + f)/sqrt(c*x^2 + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {f+g\,x}}{\sqrt {c\,x^2+a}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g*x)^(1/2)/(a + c*x^2)^(1/2),x)

[Out]

int((f + g*x)^(1/2)/(a + c*x^2)^(1/2), x)

________________________________________________________________________________________